<?php echo $this->fetch('header.html'); ?>
<div> 
<ul class="nav nav-tabs">
	<li><a href="<?php echo $this->_var['appadmin']; ?>?m=ymdian_apply">申请审核</a></li>
</ul>
 <table class='table table-bordered' width='100%'>
  <tr>
   <td>id</td>
   <td>名字</td>
   <td>电话</td>
   <td>楼栋</td>
   <td>性别</td>
   <td>申请时间</td>
   <td>状态</td>
<td>操作</td>
  </tr>
 <?php $_from = $this->_var['data']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('', 'c');if (count($_from)):
    foreach ($_from AS $this->_var['c']):
?>
<tr>
   <td><?php echo $this->_var['c']['id']; ?></td>
   <td><?php echo $this->_var['c']['nickname']; ?></td>
   <td><?php echo $this->_var['c']['telephone']; ?></td>
   <td><?php echo $this->_var['c']['sc_id']; ?></td>
   <td><?php echo $this->_var['c']['gender']; ?></td>
   <td><?php echo date("Y-m-d",$this->_var['c']['dateline']); ?></td>
   <td class="status"><?php if ($this->_var['c']['status'] == 1): ?>未审核<?php elseif ($this->_var['c']['status'] == 2): ?>成功<?php else: ?>失败<?php endif; ?></td>
<td>
<a href="javascript:;" class="doSuccess" url="<?php echo $this->_var['appadmin']; ?>?m=ymdian_apply&ajax=1&a=success&id=<?php echo $this->_var['c']['id']; ?>">通过</a>
<a href="javascript:;" class="delete" url="<?php echo $this->_var['appadmin']; ?>?m=ymdian_apply&a=delete&id=<?php echo $this->_var['c']['id']; ?>">删除</a></td>
  </tr>
   <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
 </table>
<div><?php echo $this->_var['pagelist']; ?></div>
</div>
<script>
$(document).on("click",".doSuccess",function(){
	$.get($(this).attr("url"),function(data){
		if(data.error){
			skyToast(data.message);
		}else{
			skyToast(data.message);
		}
	},"json");
})
</script> 
<?php echo $this->fetch('footer.html'); ?>